package com.yunhe.xyxxgl.view;

import com.yunhe.xyxxgl.control.LoginController;

import java.util.Scanner;

/**
 * Created by Administrator on 2017/8/9 0009.
 */
public class TeacherHome {
    public static int teacherHomeUI(){
        System.out.println("******************************学员信息管理系统-主页（欢迎"
                +LoginController.getCurrUser().getUserName()+"）**********************");
        System.out.println("1.讲师管理\t2.密码修改\t3退出系统.");
        Scanner sc = new Scanner(System.in);
        try{
            int i = sc.nextInt();
            if(i<1 || i>3){
                throw new Exception("操作码未识别！");
            }
            return i;
        }catch(Exception e){
            String msg = e.getMessage();
            System.out.println((null != msg) ? msg : "输入错误！");
            return teacherHomeUI();
        }
    }
}
